package com.tiamo.traders.myexception;

/**自定义异常处理：
 * 1、继承Exception异常类
 * 2、Exception是所有异常类的父类。
 * */
public class MyException extends Exception{
    private int code;
    private String msg;

    public MyException() {

    }
    public MyException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
